import redis

conn = redis.Redis(host='192.168.31.33', port=6379, encoding='utf-8')

conn.set('phonenum', 7788, ex=60)

value = conn.get('phonenum')
print(value)
